home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12892 < prev    next >
Encoding:
Text File  |  1996-08-05  |  989 b   |  39 lines

  1. Path: hermes.ucd.ie!usenet
  2. From: <>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: Include C++ in C programs
  5. Date: 21 Mar 1996 14:57:39 GMT
  6. Organization: University College Dublin
  7. Message-ID: <4irqp3$2lv@hermes.ucd.ie>
  8. References: <ε▓|>
  9. NNTP-Posting-Host: online.ucd.ie
  10.  
  11. roberto canales <rcanales@sag.es> writes:
  12. > Glandrup M.H.J. wrote:
  13. > > Hello,
  14. > > 
  15. > > Is there anybody who knows how to call C++ member functions in a
  16. > > C program?
  17. > > If it is not possible, please tell me...
  18. > You can declare the C++ function prototype whitch prefix:
  19. >         extern "C"
  20. > bye.
  21. > Roberto Canales  
  22. > rcanales@sag.es
  23.  
  24. The original question is in the FAQ the answer isn't, because it is wrong.
  25.  
  26. The solution will work fine if they are static member functions but 
  27. won't work if they are ordinary member functions. Ordinary member
  28. functions can't be called from C, as they take this as their first argument. this is a pointer to a class, something that C doesn't understand.
  29.  
  30.  
  31.